﻿// Copyright (C) 2012 Angel Hernández Matos / Bonafide Ideas.
// You can redistribute this software and/or modify it under the terms of the 
// Microsoft Reciprocal License (Ms-RL).  This program is distributed in the hope 
// that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
// See License.txt for more details. 

/* C++ compiler      : Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
   Creation date     : 14/04/2012
   Developer         : Angel Hernández Matos
   e-m@il            : angel@bonafideideas.com 
 					 : angeljesus14@hotmail.com
   Website           : http://www.bonafideideas.com
*/

// File generated by Wsutil Compiler version 1.0092 
// This file defines C/C++ functions, callbacks, types that correspond to operations,
// and types specified in WSDL and XSD files processed by WsUtil compiler. The generated 
// type definitions, function and callback declarations can be used with various 
// Web Services APIs either in applications that send and receive requests to and 
// from a running web service, or in the implementation of web services, or in both. 
//
// If Wsutil has generated this file from a WSDL file, the file may contain up to three 
// sets of C/C++ definitions. The first set consists of function declarations that can be 
// used in calling operations on a running web service from client applications. 
// The second set consists of callback declarations that can be used in the 
// implementation of web services.  
// The third set contains definitions C/C++ structures that are used for serialization of 
// C/C++ types to schema types defined in the WSDL file.
//
// The set of function declarations for web services clients may contain the 
// following declaration: 
//
//    HRESULT WINAPI DefaultBinding_ICalculator_Add(
//       __in WS_SERVICE_PROXY* _serviceProxy,
//       __in int a, 
//       __in int b, 
//       __out int* result, 
//       __in WS_HEAP* _heap,
//       __in_opt WS_CALL_PROPERTY* _callProperties,
//       __in const ULONG _callPropertyCount,
//       __in_opt const WS_ASYNC_CONTEXT*_asyncContext,
//       __in_opt WS_ERROR* _error);
//
// This function can be called from an application code to request ICalculator web 
// service to perform operation Add using two integers a and b as input data.
// Once the web service processes this request and sends the result back,
// the result is returned to the caller of this function in the "result" parameter.
// A WS_SERVICE_PROXY must be created using WsCreateServiceProxy() function
// before this proxy function can be invoked.
//
// The set of callbacks for implementation of web services may contain the following 
// definition of a callback: 
//
//    typedef HRESULT (CALLBACK* DefaultBinding_ICalculator_AddCallback) (
//       __in const WS_OPERATION_CONTEXT* _context,
//       __in int a, 
//       __in int b, 
//       __out int* result, 
//       __in const WS_ASYNC_CONTEXT* _asyncContext,
//       __in WS_ERROR* _error); 
//
//    typedef struct DefaultBinding_ICalculatorFunctionTable 
//    {
//         DefaultBinding_ICalculator_AddCallback DefaultBinding_ICalculator_Add;
//    } DefaultBinding_ICalculatorFunctionTable;
//
// This definition can be used to implement a function that defines the Add operation 
// as a part of an ICalculator web service. Once this callback is implemented and 
// the web service is deployed and running, if a client applications attempts to 
// execute the operation Add, the implementation of this callback is called and 
// it receives two integers a and b as input data and it returns a third integer 
// that is the result of the operation. A WS_SERVICE_ENDPOINT must be filled out, 
// and its contract field set to instance of such a function table.  
// WsCreateServiceHost may then be used to register the endpoint as a service.
// 
// The set with definitions of C/C++ structures may contain a definition of the following 
// structure:
//    typedef struct ContactInfo 
//    {
//			WCHAR*  name;
//			WCHAR*  email;
//			__int64 contactID;
//	  } ContactInfo;
//
// This structure corresponds to the following complex type defined in the WSDL file:
//    <s:complexType name="ContactInfo">
//      <s:sequence>
//        <s:element minOccurs="1" maxOccurs="1" name="name" type="s:string" />
//        <s:element minOccurs="1" maxOccurs="1" name="email" type="s:string" />
//        <s:element minOccurs="1" maxOccurs="1" name="contactID" type="s:long" />
//      </s:sequence>
//    </s:complexType>
//
// For more information about content of this file, please see the documentation for
// Wsutil compiler.
// If Wsutil generates this file from a WSDL file and policy processing is enabled using
// policy switch, the file may contain declaration of functions that can be used 
// for creating a proxy to a web service or an endpoint of a web service. 
// For example, the file may contain declaration of the following function:
//
//    HRESULT DefaultBinding_ICalculator_CreateServiceProxy(
//    __in WS_HTTP_SSL_BINDING_TEMPLATE* templateValue,
//    __in_ecount_opt(proxyPropertyCount) const WS_PROXY_PROPERTY* proxyProperties,
//    __in const ULONG proxyPropertyCount,
//    __deref_out_opt WS_SERVICE_PROXY** proxy,
//    __in_opt WS_ERROR* error);
//
// This function can be called from application code to create a service
// proxy object. A service proxy must be created before any request can be sent 
// to the web service.
//
// Also, the file may contain declaration of the following function :
//
//    HRESULT DefaultBinding_ICalculator_CreateServiceEndpoint(
//    __in WS_HTTP_SSL_BINDING_TEMPLATE* templateValue,
//    __in_opt WS_STRING address,
//    __in_opt struct DefaultBinding_ICalculatorFunctionTable* functionTable,
//    __in_opt WS_SERVICE_SECURITY_CALLBACK authorizationCallback,
//    __in_ecount_opt(endpointPropertyCount) WS_SERVICE_ENDPOINT_PROPERTY* endpointProperties,
//    __in const ULONG endpointPropertyCount,
//    __in WS_HEAP* heap,
//    __deref_out_opt WS_SERVICE_ENDPOINT** serviceEndpoint,
//    __in_opt WS_ERROR* error);
//
// This function can be used to create a Service Host object, which has to be 
// created before a web services starts receiving requests from its clients.
//
// For more information about content of this file, please see the documentation for
// Wsutil compiler.
#if _MSC_VER > 1000 
#pragma once
#endif

#ifdef __cplusplus
extern "C" {
#endif

// The following client functions were generated:

//     BasicHttpBinding_ICyberNanny_AddRequest
//     BasicHttpBinding_ICyberNanny_RemoveRequest

// The following server function tables were generated:

//     struct BasicHttpBinding_ICyberNannyFunctionTable

// the following policy helpers were generated:

//  BasicHttpBinding_ICyberNanny_CreateServiceProxy;
//  BasicHttpBinding_ICyberNanny_CreateServiceEndpoint;

// The following header files must be included in this order before this one

#include <WebServices.h>
#include "cybernanny2.xsd.h"
#include "cybernanny3.xsd.h"
#include "cybernanny0.xsd.h" 


////////////////////////////////////////////////
// Policy helper routines
////////////////////////////////////////////////

//  WS_CHANNEL_PROPERTY_ENCODING = WS_ENCODING_XML_UTF8,
//  WS_CHANNEL_PROPERTY_ADDRESSING_VERSION = WS_ADDRESSING_VERSION_TRANSPORT,
//  WS_ENVELOPE_VERSION = WS_ENVELOPE_VERSION_SOAP_1_1,
// client channel type: WS_CHANNEL_TYPE_REQUEST, service endpoint channel type: WS_CHANNEL_TYPE_REPLY

HRESULT BasicHttpBinding_ICyberNanny_CreateServiceProxy(
    __in_opt WS_HTTP_BINDING_TEMPLATE* templateValue,
    __in_ecount_opt(proxyPropertyCount) const WS_PROXY_PROPERTY* proxyProperties,
    __in const ULONG proxyPropertyCount,
    __deref_out_opt WS_SERVICE_PROXY** _serviceProxy,
    __in_opt WS_ERROR* error);

struct BasicHttpBinding_ICyberNannyFunctionTable;
HRESULT BasicHttpBinding_ICyberNanny_CreateServiceEndpoint(
    __in_opt WS_HTTP_BINDING_TEMPLATE* templateValue,
    __in_opt CONST WS_STRING* address,
    __in_opt struct BasicHttpBinding_ICyberNannyFunctionTable* functionTable,
    __in_opt WS_SERVICE_SECURITY_CALLBACK authorizationCallback,
    __in_ecount_opt(endpointPropertyCount) WS_SERVICE_ENDPOINT_PROPERTY* endpointProperties,
    __in const ULONG endpointPropertyCount,
    __in WS_HEAP* heap,
    __deref_out_opt WS_SERVICE_ENDPOINT** serviceEndpoint,
    __in_opt WS_ERROR* error);

////////////////////////////////////////////////
// Client functions definitions
////////////////////////////////////////////////

// operation: BasicHttpBinding_ICyberNanny_AddRequest
HRESULT WINAPI BasicHttpBinding_ICyberNanny_AddRequest(
    __in WS_SERVICE_PROXY* _serviceProxy,
    __in enum Common_RequestType type, 
    __in int userIdentifier, 
    __out WS_STRING* AddRequestResult, 
    __in WS_HEAP* _heap,
    __in_ecount_opt(_callPropertyCount) const WS_CALL_PROPERTY* _callProperties,
    __in const ULONG _callPropertyCount,
    __in_opt const WS_ASYNC_CONTEXT* _asyncContext,
    __in_opt WS_ERROR* _error);

// operation: BasicHttpBinding_ICyberNanny_RemoveRequest
HRESULT WINAPI BasicHttpBinding_ICyberNanny_RemoveRequest(
    __in WS_SERVICE_PROXY* _serviceProxy,
    __in int userIdentifier, 
    __in BOOL removeAll, 
    __out BOOL* RemoveRequestResult, 
    __deref_out_opt StringBuilder** message, 
    __in WS_HEAP* _heap,
    __in_ecount_opt(_callPropertyCount) const WS_CALL_PROPERTY* _callProperties,
    __in const ULONG _callPropertyCount,
    __in_opt const WS_ASYNC_CONTEXT* _asyncContext,
    __in_opt WS_ERROR* _error);

////////////////////////////////////////////////
// Service functions definitions
////////////////////////////////////////////////

typedef HRESULT (CALLBACK* BasicHttpBinding_ICyberNanny_AddRequestCallback) (
    __in const WS_OPERATION_CONTEXT* _context,
    __in enum Common_RequestType type, 
    __in int userIdentifier, 
    __out WS_STRING* AddRequestResult, 
    __in_opt const WS_ASYNC_CONTEXT* _asyncContext,
    __in_opt WS_ERROR* _error);

typedef HRESULT (CALLBACK* BasicHttpBinding_ICyberNanny_RemoveRequestCallback) (
    __in const WS_OPERATION_CONTEXT* _context,
    __in int userIdentifier, 
    __in BOOL removeAll, 
    __out BOOL* RemoveRequestResult, 
    __deref_out_opt StringBuilder** message, 
    __in_opt const WS_ASYNC_CONTEXT* _asyncContext,
    __in_opt WS_ERROR* _error);

// binding: BasicHttpBinding_ICyberNanny
typedef struct BasicHttpBinding_ICyberNannyFunctionTable 
{
    BasicHttpBinding_ICyberNanny_AddRequestCallback BasicHttpBinding_ICyberNanny_AddRequest;
    BasicHttpBinding_ICyberNanny_RemoveRequestCallback BasicHttpBinding_ICyberNanny_RemoveRequest;
} BasicHttpBinding_ICyberNannyFunctionTable;

////////////////////////////////////////////////
// Global web service descriptions.
////////////////////////////////////////////////

typedef struct _cybernanny_wsdl
{
    struct // messages
    {
        // message: ICyberNanny_AddRequest_InputMessage
        // c type: _AddRequest
        // action: "http://tempuri.org/ICyberNanny/AddRequest"
        // messageDescription: cybernanny_wsdl.messages.ICyberNanny_AddRequest_InputMessage
        WS_MESSAGE_DESCRIPTION ICyberNanny_AddRequest_InputMessage;
        
        // message: ICyberNanny_AddRequest_OutputMessage
        // c type: _AddRequestResponse
        // action: "http://tempuri.org/ICyberNanny/AddRequestResponse"
        // messageDescription: cybernanny_wsdl.messages.ICyberNanny_AddRequest_OutputMessage
        WS_MESSAGE_DESCRIPTION ICyberNanny_AddRequest_OutputMessage;
        
        // message: ICyberNanny_RemoveRequest_InputMessage
        // c type: _RemoveRequest
        // action: "http://tempuri.org/ICyberNanny/RemoveRequest"
        // messageDescription: cybernanny_wsdl.messages.ICyberNanny_RemoveRequest_InputMessage
        WS_MESSAGE_DESCRIPTION ICyberNanny_RemoveRequest_InputMessage;
        
        // message: ICyberNanny_RemoveRequest_OutputMessage
        // c type: _RemoveRequestResponse
        // action: "http://tempuri.org/ICyberNanny/RemoveRequestResponse"
        // messageDescription: cybernanny_wsdl.messages.ICyberNanny_RemoveRequest_OutputMessage
        WS_MESSAGE_DESCRIPTION ICyberNanny_RemoveRequest_OutputMessage;
        
    } messages;
    struct // contracts
    {
        // binding: BasicHttpBinding_ICyberNanny
        // portType: ICyberNanny
        // operation: BasicHttpBinding_ICyberNanny_AddRequest
        //     input message: ICyberNanny_AddRequest_InputMessage
        //     output message: ICyberNanny_AddRequest_OutputMessage
        // operation: BasicHttpBinding_ICyberNanny_RemoveRequest
        //     input message: ICyberNanny_RemoveRequest_InputMessage
        //     output message: ICyberNanny_RemoveRequest_OutputMessage
        // contractDescription: cybernanny_wsdl.contracts.BasicHttpBinding_ICyberNanny
        WS_CONTRACT_DESCRIPTION BasicHttpBinding_ICyberNanny;
        
    } contracts;
    struct // policies
    {
        // policy for binding: BasicHttpBinding_ICyberNanny
        // port name: BasicHttpBinding_ICyberNanny, binding: BasicHttpBinding_ICyberNanny, namespace: http://tempuri.org/
        WS_HTTP_POLICY_DESCRIPTION BasicHttpBinding_ICyberNanny;
    } policies;
} _cybernanny_wsdl;

extern const _cybernanny_wsdl cybernanny_wsdl;

#ifdef __cplusplus
}
#endif

